//Source file: D:\\test\\com\\ce\\pms\\custservice\\model\\AbstractServiceItem.java

package com.ce.pms.custservice.model;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.ce.pms.common.model.SysInfo;
import com.sitechasia.webx.core.model.IDomainObject;

/**
 * 实体名称:服务项目 关联数据表:CE_CUST_SERV_ITEM
 *
 * @author yandawei
 * @CreateDate:2008-12-8
 */
@Entity
@Table(name = "CE_CUST_SERV_ITEM")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "CLAZZ", discriminatorType = DiscriminatorType.STRING)
public abstract class AbstractServiceItem implements IDomainObject {

	/**
	 * 服务项目ID
	 */
	@Id
	@GeneratedValue
	@Column(name = "CUST_SERV_ITEM_ID")
	private Long keyword;

	/**
	 * 物料/服务名称
	 */
	@Column(name = "NAME", nullable = false, length = 36)
	private String name;

	/**
	 * 编号
	 */
	@Column(name = "CODE",length = 36)
	private String code;

	/**
	 * 单价
	 */
	@Column(name = "PRICE", precision = 18, scale = 2)
	private BigDecimal price = new BigDecimal(0.00);

	/**
	 * 金额
	 */
	@Column(name = "FEE", precision = 18, scale = 2)
	private BigDecimal fee = new BigDecimal(0.00);

	/**
	 * 派工单
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "DISPATCH_FORM_ID")
	private DispatchFormDO dispatchFormDO;

	/**
	 * 备注
	 */
	@Column(name = "REMARK", length = 200)
	private String remark;

	/**
	 * 系统信息
	 */
	@Embedded
	private SysInfo sysInfo;

	/**
	 * 客户使用量
	 */
	@Column(name = "CUSTOMER_USAGE")
	private Short customerUsage;

	/**
	 * @roseuid 4937AB2B0290
	 */
	public AbstractServiceItem() {

	}

	/**
	 * 自定义构造器
	 *
	 * @param name -
	 *            名称
	 * @param price -
	 *            价格
	 * @param fee -
	 *            金额
	 */
	public AbstractServiceItem(String name, BigDecimal price, BigDecimal fee) {
		this.name = name;
		this.price = price;
		this.fee = fee;
	}

	public BigDecimal getFee() {
		return fee;
	}

	public void setFee(BigDecimal fee) {
		this.fee = fee;
	}

	public Long getKeyword() {
		return keyword;
	}

	public void setKeyword(Long keyword) {
		this.keyword = keyword;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public DispatchFormDO getDispatchFormDO() {
		return dispatchFormDO;
	}

	public void setDispatchFormDO(DispatchFormDO dispatchFormDO) {
		this.dispatchFormDO = dispatchFormDO;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public SysInfo getSysInfo() {
		return sysInfo;
	}

	public void setSysInfo(SysInfo sysInfo) {
		this.sysInfo = sysInfo;
	}

	public Short getCustomerUsage() {
		return customerUsage;
	}

	public void setCustomerUsage(Short customerUsage) {
		this.customerUsage = customerUsage;
	}

}
